Skip to content

[WIP] Aligning Setup Logs Display in CopilotRemoteAgentManager with Session Log Editor #7414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 28, 2025

  • Analyze the problem: The streamSessionLogs method in CopilotRemoteAgentManager shows generic "Working..." progress when logs are empty, but the session log editor shows detailed setup steps
  • Understand current implementation: Session log editor uses getWorkflowStepsFromAction to fetch setup steps when logs.trim().length === 0
  • Verify build and lint work correctly
  • Modify streamSessionLogs to fetch setup steps when logs are empty and session is in progress
  • Create helper method to format setup steps for chat streaming
  • Update polling logic to stream setup step progress instead of generic "Working..." message
  • Test the implementation to ensure setup logs are displayed during session progress
  • Validate changes work correctly and don't break existing functionality

Changes Made:

  • Added streamSetupSteps() method that fetches workflow steps and formats them as markdown with icons (✅ completed, 🔄 in progress, ⏳ queued)
  • Added hasStreamedSetupSteps tracking variable to prevent duplicate setup step streaming
  • Modified polling logic to check for empty logs and stream setup steps when available
  • Enhanced progress message to show "Initializing session..." after setup steps are shown vs "Working..." before

Implementation Details:

  • Uses the same getWorkflowStepsFromAction method as the session log editor
  • Follows identical logic for filtering steps (show completed + first non-completed)
  • Aligns with the condition logs.trim().length === 0 from session log editor
  • Maintains existing error handling and logging patterns
  • Only 53 lines added to one file - minimal surgical change

Validation:

  • ✅ Code compiles successfully with no new warnings
  • ✅ Lint passes with no new issues
  • ✅ Logic aligns exactly with session log editor implementation
  • ✅ Maintains backward compatibility

Created from VS Code via the GitHub Pull Request extension.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants